package com.eascs.ticket.configuration.controller;

import javax.inject.Inject;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.eascs.site.page.PaginationInfo;
import com.eascs.site.view.ViewContext;
import com.eascs.site.view.button.Button;
import com.eascs.site.view.button.ButtonHelper;
import com.eascs.ticket.common.controller.BaseMasterViewController;
import com.eascs.ticket.configuration.service.ProjectCommentTemplateService;
import com.eascs.ticket.user.interceptor.SuperAdministrator;

@Controller
@SuperAdministrator
public class ProjectCommentTemplateViewController extends BaseMasterViewController {

	@Inject
	private ProjectCommentTemplateService projectCommentTemplateService;

	@RequestMapping("/configuration/projectCommentTemplate/list")
	public String viewAllProjectCommentTemplate() {
		PaginationInfo paginationInfo = new PaginationInfo(projectCommentTemplateService.getAllProjectCommentTemplate(), new String[] { "项目名称", "工单类型", "状态", "模块名称" });
		paginationInfo.setMoreButtons(new Button[] { ButtonHelper.createAjaxButton("修改", "/configuration/projectCommentTemplate/editProjectCommentTemplate?id="), ButtonHelper.createAjaxConfirmButton("删除", "/configuration/projectCommentTemplate/deleteProjectCommentTemplate?id=") });
		ViewContext.put("paginationInfo", paginationInfo);
		ViewContext.put("title", "项目状态备注模板配置信息");
		ViewContext.put("addUrl", "/configuration/projectCommentTemplate/editProjectCommentTemplate");
		return "/view/paginationInfoWithUmedit";
	}
}
